﻿using Class_Entity.ObjectTwo;
using DataAccess.ObjectTwo;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BussinessObject.ObjectTwo
{
   public class B_Cal
    {
       DataTable tb = new DataTable();
       D_Cal ex = new D_Cal();
       public C_Calculator Dis(int a, int b)
       {
           C_Calculator fx = new C_Calculator();
           tb = ex.Distance(a, b);
           foreach (DataRow dr in tb.Rows)
           {
               fx.KC = float.Parse(dr["KM"].ToString());             
           }
           return fx;
       }
       public C_Calculator FEE(int a, int b)
       {
           C_Calculator fx = new C_Calculator();
           tb = ex.FEE(a, b);
           foreach (DataRow dr in tb.Rows)
           {
               fx.FEE_PER_KM = float.Parse(dr["FEE_PER_KM"].ToString());
               fx.FEE_PER_KG = float.Parse(dr["FEE_PER_KG"].ToString());
           }
           return fx;
       }
    }
}
